<%@ include file="connect.jsp" %>

<%
    String pert = request.getParameter("question");
    String pilA = request.getParameter("pilA");
    String pilB = request.getParameter("pilB");
    String pilC = request.getParameter("pilC");
    String pilD = request.getParameter("pilD");
    String Ans = request.getParameter("answer");
    String queID = request.getParameter("queid");
    String ganti = pert.replaceAll("'", "''");


    stat.executeUpdate("UPDATE DetailGames set Answer = '" + Ans + "' , Option_1 = '" + pilA + "' , " +
            "Option_2 = '" + pilB + "' , Option_3 = '" + pilC + "' , Option_4 = '" + pilD + "' , question = '" + ganti + "' where detailGamesID = '" + queID + "' ");
    conn.close();
    response.sendRedirect("games.jsp?respon=Question has been updated!");

%>
